<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script src="calendar/jquery.gvChart-1.0.1.min.js"></script>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
gvChartInit();

jQuery(document).ready(function(){
	
	jQuery('#myTable3').gvChart({
		chartType: 'BarChart',
		gvSettings: {
		
			vAxis: {title: '기준정보'},
			hAxis: {title: '처리갯수'},
			width: 740,
			height: 350,
			chartArea:{left:150, width:"490"}
			//chartArea:{left:150, width:"80%",height:"80%"}
			}
	});
});
</script>
<!--<script type="text/javascript" src="script/sms_riskI_script.js"></script>-->
</head>
<body>
<div class="box">
      		<h4 class="white">
      		<c:choose>
		      	<c:when test="${sessionScope.lastProId==null || sessionScope.lastProId=='0'}">
		      		&nbsp;
		      	</c:when>
		      	<c:otherwise>
		      		현재 기준은 <span class="yellow">${sessionScope.proDayIndex } | ${sessionScope.proNm }</span>입니다
		      	</c:otherwise>
	        </c:choose>
      		</h4>
        <form name="riskIDelForm" action="projectAction.do" method="post">
        	<input type="hidden" name="pro_id" id="pro_id" value="${sessionScope.lastProId }"></input>
        	<div class="box-container1">
	        	<table class="table-long">
		   			<colgroup>
		   				<col width="28%"/>
		   				<col width="24%"/>
		   				<col width="24%"/>
		   				<col width="24%"/>
		   			</colgroup>
		   			<thead>
		   				<tr>
		   					<td>기준정보</td>
		   					<td>처리개수/전체</td>
		   					<td>진도율(%)</td>
		   					<td>STATE</td>
		   				</tr>
		   			</thead>
		   			<tbody>
	      				<c:choose>
	                    	<c:when test="${fn:length(list)!= 0}">
	                       	<c:forEach var="list" items="${requestScope.list}" varStatus="status">
	                       	
	                       	
		                    	<tr <c:if test="${status.index%2==0 }">class="odd"</c:if>>
	                    			<td>
	                    				<div class="ellipsis"  style="width:100%;" title="${list.gun }">${list.gun }</div>
	                    			</td>
	                    			<td  class="col-alignRight" style="padding-right: 105px">
	                    				<div class="ellipsis"  style="width:100%;" title="${list.cnt1 } / ${list.cnt2 }">${list.cnt1 } / ${list.cnt2 }</div>
	                    			</td>
	                    			<td class="col-alignRight" style="padding-right: 125px">
	                    				<div class="ellipsis"  style="width:100%;" title="${list.dyul }">${list.dyul }</div>
	                    			</td>
	                    			<td>
	                    				<div <c:choose><c:when test="${list.state=='Y' }">title="마감"</c:when><c:otherwise>title="착수"</c:otherwise></c:choose>>
	                    				<%--Y = 마감 , 그외 = 착수 --%>
	                    				<c:choose>
	                    					<c:when test="${list.state=='Y' }">
	                    						마감
	                    					</c:when>
	                    					<c:otherwise>
	                    						착수
	                    					</c:otherwise>
	                    				</c:choose>
	                    				
	                    				</div>
	                    			</td>
	                    		</tr>
	                    		
		                   
	                    	</c:forEach>
	                    	</c:when>
	                    	<c:otherwise>
	                    		<tr class="odd">
									<td style="text-align: center; height: 35px ; vertical-align: middle; " colspan="4" valign="middle" class="col-first">-기준정보가 없습니다-</td>
								</tr>
	                    	</c:otherwise>
	                    	</c:choose>
	      			</tbody>
		   		</table>
		   		<br/>
		   		
		   		<div id="graphDiv">
	        	<table id='myTable3' style="width: 100%;">
					<caption>${sessionScope.proNm }</caption>
					<thead>
						<tr>
							<th></th>
							<c:forEach var="list" items="${requestScope.list}" varStatus="status">
							
	                       	
								<th>${list.gun }</th>
								
								
		                   
							</c:forEach>
                  			</tr>
                   	</thead>
					<tbody>
						<tr>
							<th>처리개수</th>
							<c:forEach var="list" items="${requestScope.list}" varStatus="status">
								
	                       	
								<td>${list.cnt1 }</td>
		                   
							</c:forEach>
						</tr>
						
						<tr>
							<th>전체</th>
							<c:forEach var="list" items="${requestScope.list}" varStatus="status">
								
	                       	
								<td>${list.cnt2 }</td>
		                   
							</c:forEach>
						</tr>
						
						
					</tbody>
				</table>
				</div>
   		</div><!-- end of div.box-container1 -->
	</form>
</div> <!-- end of div.box -->


</body>
</html>

<%--
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<div class="box">
<img src="img/mainImg.jpg"/>

      		<h4 class="white">Tables (Long Version)</h4>
        <div class="box-container">     		
      		<table class="table-long">
      			<thead>
      				<tr>
      					<td><input type="checkbox" /></td>
      					<td>위협유형</td>
      					<td>위협명</td>
      					<td class="col-third">위협공격자</td>
      					<td class="col-fourth">위협원천</td>
      					<td>위협동기</td>
      					<td>위협결과</td>
      					<td>기능</td>
      				</tr>
      			</thead>
      			<tfoot>
      				<tr>
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td colspan="8"><div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select-->
      					<a href="#" class="button"><span>등록</span></a></div>
                        <div class="align-right"><a href="#" class="button"><span>수정</span></a></div></td>
      				</tr>
      			</tfoot>
      			<tbody>
      				<tr class="odd">
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">내부자</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">호기심</td>
      					<td class="col-first">직원에 대한 모욕</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr>
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="">물리적피해</td>
      					<td class=""><a href="#">화재</a></td>
      					<td class="">내부자</td>
      					<td class="">&nbsp;</td>
      					<td class="">실수</td>
      					<td class="">직원에 대한 모욕</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr class="odd">
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">내부자</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">실수</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr>
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">날씨</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr class="odd">
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">자연현상</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr>
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">날씨</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr class="odd">
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">자연현상</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr>
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">날씨</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr class="odd">
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">자연현상</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr>
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">날씨</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr class="odd">
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">자연현상</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr>
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">날씨</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				<tr class="odd">
      					<td class="col-chk"><input type="checkbox" /></td>
      					<td class="col-first">물리적피해</td>
      					<td class="col-first"><a href="#">화재</a></td>
      					<td class="col-first">자연현상</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="col-first">&nbsp;</td>
      					<td class="row-nav"><a href="#" class="table-edit-link">Edit</a> <span class="hidden"> | </span> <a href="#" class="table-delete-link">Delete</a></td>
      				</tr>
      				
      			</tbody>
      		</table>  	
      	</div><!-- end of div.box-container -->
      	 
      	</div> <!-- end of div.box -->
      	
      	--%>